<template>
	<view class="content">
		<view class="problem">
			<uni-collapse accordion="true">
				<uni-collapse-item class="uni-collapse-item" v-for="(item,index) in problemList" :title="item.title" showAnimation :thumb="imgUrl+'/static/wap/img/q_one@2x.png'" >
					<view style="padding: 30rpx; ">
						<!-- #ifdef H5 -->
						<text class="problem_txt" v-html="item.answer">
						</text>
						<!-- #endif -->
						<!-- #ifdef MP-WEIXIN -->
						       <rich-text :nodes="item.answer"></rich-text>
						<!-- #endif -->
					</view>
				</uni-collapse-item> 
			</uni-collapse>
		</view>
	</view>
</template>

<script>
	import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
	import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
	import util from '../../static/util.js'
	export default {
		components: {
			uniCollapse,
			uniCollapseItem
		},
		data() {
			return {
				imgUrl:util.globalData.imgPre,
				title:'什么是火星',
				page:1,
				problemList:'',
				editorCtx:''
			};
		},
		watch: {
			problemList(newValue, oldValue) {
				var that=this

			}
		},
		methods:{

		},
		onLoad(){
			var that=this;
			that.ajax({
				url:'api/Problem/getProblemList',
				data:{
					 page:that.page,
					 limit:10,
				},
				success:function(res){
					//console.log(res)
					that.problemList=res.data
				}
			  })

		},
		onReachBottom() {
			console.log("到底了")
		},
	}
</script>

<style lang="less" scoped>
	.problem{
		padding: 0 20rpx;
		.uni-collapse-item{
			// height: 122rpx; 
			.problem_txt{
				font-size: 26rpx;
				color: #999;
			}
		}
		 
	}
</style>
